1. Field of the Invention
The present invention relates to a numerical control device which controls a machine tool and the like.
2. Description of the Related Art
FIG. 5 shows a system configuration of a motor subjected to an analog spindle control performed by a numerical control device. An analog voltage (a speed instruction) for analog spindle control is applied to an amplifier of a motor (for example, a main spindle motor) from a numerical control device 10 and the motor is rotated at the speed in proportion to the applied analog voltage.
Specifically, the numerical control device 10 normally outputs an analog voltage from −10 V to +10V to an analog amplifier 20 as speed instruction for analog spindle control. The analog amplifier 20 amplifies electric power supplied via an electromagnetic switch 21 from a three phase AC power source 22 for motor driving in proportion to the analog voltage of the speed instruction, and supplies current to a motor 23 via a power line 24. Thereby, the motor 23 is rotated at a rotation speed corresponding to the speed instruction (analog voltage). At this time, the rotation speed of the motor 23 is detected by a speed detector 25, and the detected speed signal is fed back to the analog amplifier 20. The analog amplifier 20 controls current output so as to make the detected speed the same as the instruction speed.
Thus, in the analog spindle control of the numerical control device 10, the speed of the motor 23 can be instructed by an analog voltage. However, an analog voltage generated in practice, necessarily includes an error with respect to the speed instructed by the numerical control device 10, and an error is also generated on the side of the analog amplifier 20 receiving the instruction. As a result, the speed of the motor 23 is not completely coincident with the instruction speed. This becomes a problem in particular when a speed “0” is instructed. That is, there arises a problem that in spite of the fact that a speed 0 is instructed, the motor rotates at a low speed (at a speed not equal to 0) due to the error of the analog voltage.
In order to avoid such phenomenon, an enable signal which indicates the validity or invalidity of the speed instruction signal is sent out from the numerical control device 10 to the analog amplifier 20 at the same time with and in addition to the above described speed instruction. That is, when the numerical control device 10 performs control to instruct the speed 0, it stops sending out the enable signal and invalidates the instructed analog voltage. On the other hand, when the numerical control device 10 instructs the speed other than 0, it performs control to send out the enable signal and to validate the analog signal.
The analog amplifier 20 judges the speed instruction as valid while receiving the enable signal. If the sending out of the enable signal is stopped, the analog amplifier 20 performs control so as to make the speed of the motor become “0”. Alternatively, the current output to the motor via the power line 24 is stopped.
The numerical control device 10 outputs an emergency stop signal, and performs ON/OFF control of the electromagnetic switch which interrupts the electric power supplied to the analog amplifier 20 from the three phase AC power source 22 for motor driving. This emergency stop signal is for interrupting the electric power supplied to the analog amplifier 20, in an alarm state of the numerical control device 10, or at the time of an emergency stopping of the numerical control device 10, such as when the emergency stop button is pushed by an operator. The emergency stop signal may be directly outputted from the numerical control device 10, or may be outputted through an I/O unit and the like, connected with the numerical control device 10.
FIG. 6 is a block diagram showing a main part of the conventional numerical control device 10, which is essentially constituted by circuits outputting a speed instruction, an enable signal and an emergency stop signal.
A CPU (processing unit) 11 obtains the speed instruction for performing analog spindle control, and determines an analog voltage output value corresponding to the obtained speed instruction, and writes a digital value corresponding to the determined output value into a D/A (digital/analog) converter 12. The D/A converter 12 converts the written digital value to an analog value and outputs the converted analog value. An amplifier 13 amplifies the outputted analog voltage. Then, the amplifier 13 outputs the amplified analog voltage to the analog amplifier 20 as a speed instruction.
The CPU 11 outputs a speed instruction (digital value) to the D/A converter 12 when the speed instruction value is a value other than “0”. At the same time, the CPU 11 performs writing for sending out an enable signal, into a driver 16 which outputs the enable signal. On the other hand, when the speed instruction value is “0”, the CPU 11 performs writing for stopping sending out the enable signal, into the driver 16.
When an alarm is generated, or when an emergency stop button (not shown) is pushed, the CPU 11 outputs an emergency stop signal via a driver 17, and opens the electromagnetic switch 21 so as to make the electric power supplied to the analog amplifier 20 interrupted.
In the numerical control device 10 performing the analog spindle control operation as described above, when a failure occurs in the D-A converter 12 which converts the speed instruction of a digital value into an analog voltage, and the amplifier 13 which amplifies the output voltage of the D-A converter 12 and outputs the amplified analog voltage as the speed instruction, and the like, an abnormal analog voltage is outputted, and hence, the motor 23 may not be moved at the speed as instructed by the CPU 11. The conventional numerical control device is not provided with a system for checking whether the analog voltage outputted as the speed instruction is normal or not, so that a machine and device such as a machine tool, which are controlled by the numerical control device, may perform an abnormal operation. This is not preferred and dangerous. For example, in the case where the motor under the analog spindle control is a main spindle motor of a machine tool, such failure causes the main spindle to abnormally rotate. As a result, when normal working can not be performed, a tool breakage and the like may occur.